package ru.mcfr.oxygen.framework;

import ro.sync.ecss.extensions.api.*;
import ro.sync.ecss.extensions.api.link.ElementLocatorProvider;
import ro.sync.ecss.extensions.api.structure.AuthorBreadCrumbCustomizer;
import ro.sync.ecss.extensions.api.structure.AuthorOutlineCustomizer;
import ro.sync.ecss.extensions.commons.DefaultElementLocatorProvider;
import ru.mcfr.oxygen.framework.extensions.*;

/**
 * Simple Document Framework extension bundle.
 */
public class MOFExtensionsBundle extends ExtensionsBundle {

    /**
     * Editor for attributes values.
     */

//    public AttributesValueEditor createAttributesValueEditor(boolean forEclipsePlugin) {
//        return new MOFAttributesValueEditor();
//    }

    /**
     * Simple documentation framework state listener.
     */

    public AuthorExtensionStateListener createAuthorExtensionStateListener() {
        return new MOFAuthorExtensionStateListener();
    }

    /**
     //   * Filter for content completion proposals from the schema manager.
     //   */
//
//  public SchemaManagerFilter createSchemaManagerFilter() {
//    return new SDFSchemaManagerFilter();
//  }

    /**
     * Default element locator.
     */

    public ElementLocatorProvider createElementLocatorProvider() {
        return new DefaultElementLocatorProvider();
    }

    /**
     * Expand content references.
     */

    public AuthorReferenceResolver createAuthorReferenceResolver() {
        return new MOFReferencesResolver();
    }

    /**
     * CSS styles filtering.
     */

    public StylesFilter createAuthorStylesFilter() {
        return new MOFStylesFilter();
    }

    /**
     * Provider for table cell span informations.
     */

    public AuthorTableCellSpanProvider createAuthorTableCellSpanProvider() {
        return new TableCellSpanProvider();
    }

    /**
     * Table column width provider responsible of handling modifications regarding
     * table width and column widths.
     */

    public AuthorTableColumnWidthProvider createAuthorTableColumnWidthProvider() {
        return new TableColumnWidthProvider();
    }

    /**
     * Editing support for SDF documents responsible of handling typing and paste events inside section and tables.
     */

    public AuthorSchemaAwareEditingHandler getAuthorSchemaAwareEditingHandler() {
        return new MOFSchemaAwareEditingHandler();
    }

    /**
     * Author Outline customizer used for custom filtering and nodes rendering in the Outline.
     */

    public AuthorOutlineCustomizer createAuthorOutlineCustomizer() {
        return new MOFAuthorOutlineCustomizer();
    }

    /**
     * Simple Document Framework Author customizer used for custom nodes rendering
     * in the Breadcrumb.
     */

    public AuthorBreadCrumbCustomizer createAuthorBreadCrumbCustomizer() {
        return new MOFAuthorBreadCrumbCustomizer();
    }

    /**
     * @see ro.sync.ecss.extensions.api.ExtensionsBundle#createExternalObjectInsertionHandler()
     */

    public AuthorExternalObjectInsertionHandler createExternalObjectInsertionHandler() {
        return new MOFExternalObjectInsertionHandler();
    }

    /**
     * The unique identifier of the Document Type.
     * This identifier will be used to store custom SDF options.
     */

    public String getDocumentTypeID() {
        return "MCFR.Fenomen.document.type";
    }

    /**
     * Bundle description.
     */
    public String getDescription() {
        return "A custom extensions bundle used for the Simple Document Framework";
    }
}